get path and name of file for open()

39

import os
f = open('file.txt')
file_path = os.path.realpath(f.name)

Comments

Submit
0 Comments